Skip to content

Conversation

@reddevilmidzy
Copy link
Member

@reddevilmidzy reddevilmidzy commented Dec 29, 2025

close: #150399

There's an issue where tests/ui/README.md isn't updated whenever the ui subdirectory changes.
I've added subdirectory change detection to tidy added a new mention to triage.toml to notify tests/ui/README.md to also be updated.

r? @Urgau

@rustbot
Copy link
Collaborator

rustbot commented Dec 29, 2025

triagebot.toml has been modified, there may have been changes to the review queue.

cc @davidtwco, @wesleywiser

@rustbot rustbot added A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-tidy Area: The tidy tool S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Dec 29, 2025
@Urgau
Copy link
Member

Urgau commented Dec 29, 2025

Looks good to me, but I will let the final review to a T-bootstrap member.

Btw, could you make the title and description a bit more descriptive.

r? bootstrap

@rustbot rustbot assigned Zalathar and unassigned Urgau Dec 29, 2025
@reddevilmidzy reddevilmidzy changed the title Add subdirectory change detection to tidy Tidy: detect subdirectory changes so tests/ui/README.md stays in sync Dec 30, 2025
@reddevilmidzy
Copy link
Member Author

Okay, thank you for the review:)

@reddevilmidzy reddevilmidzy changed the title Tidy: detect subdirectory changes so tests/ui/README.md stays in sync Tidy: detect ui tests subdirectory changes so tests/ui/README.md stays in sync Dec 30, 2025
@Zalathar
Copy link
Member

I don't quite understand the purpose of having a separate ui_suites.txt.

If the goal is to keep tests/ui/README.md in sync with the subdirectories, wouldn't it make more sense to compare the list of subdirectories to the list of headings in the readme?

@reddevilmidzy
Copy link
Member Author

reddevilmidzy commented Dec 30, 2025

I don't quite understand the purpose of having a separate ui_suites.txt.

If the goal is to keep tests/ui/README.md in sync with the subdirectories, wouldn't it make more sense to compare the list of subdirectories to the list of headings in the readme?

Ah, since the initial suggestion was to "add comments when subdirectories change," so we implemented it by creating a ui_suites.txt file so that triagebot could leave comments.

If we wanted to include directory change detection in tidy and force modifications to tests/ui/README.md, comparing the subtitles of tests/ui/README.md would be a better approach, as you suggested.

I will change it.

@Urgau
Copy link
Member

Urgau commented Dec 30, 2025

I don't quite understand the purpose of having a separate ui_suites.txt.

If the goal is to keep tests/ui/README.md in sync with the subdirectories, wouldn't it make more sense to compare the list of subdirectories to the list of headings in the readme?

Parsing a Markdown file is non-trivial and tidy currently doesn't have a dependency on pulldown-cmark. I'm not sure we would want to add such dependency to tidy, so we would have to approximate it.

But in general yes, looking at tests/ui/README.md is probably better.

@Zalathar
Copy link
Member

Given that this is an in-tree tidy check for a single file that we already control, I don't think we need to actually parse Markdown.

We can just assume that tests/ui/README.md will be written in a predictable style, and use a relatively-simple regex to extract directory names from lines that start with ##.

If somebody tries to modify the readme in a way that would break the tidy check, well, maybe they shouldn't be doing that.

@Zalathar
Copy link
Member

Zalathar commented Jan 2, 2026

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 2, 2026
@reddevilmidzy reddevilmidzy force-pushed the tidy-sub-dir branch 2 times, most recently from 7f0149f to 4bbba21 Compare January 2, 2026 11:16
@rustbot

This comment has been minimized.

@reddevilmidzy
Copy link
Member Author

Unified by removing '/' at the end of the title and added directories that did not have descriptions.

created:

tidy [ui_tests (tests)]: ui subdirectory `tests/ui/annotate-moves` created
tidy [ui_tests (tests)]: ui subdirectory `tests/ui/any` created
tidy [ui_tests (tests)]: ui subdirectory `tests/ui/collections` created
tidy [ui_tests (tests)]: ui subdirectory `tests/ui/deref` created
tidy [ui_tests (tests)]: ui subdirectory `tests/ui/dist` created
tidy [ui_tests (tests)]: ui subdirectory `tests/ui/eii` created
tidy [ui_tests (tests)]: ui subdirectory `tests/ui/float` created
tidy [ui_tests (tests)]: ui subdirectory `tests/ui/fn_traits` created
tidy [ui_tests (tests)]: ui subdirectory `tests/ui/higher-ranked-trait-bounds` created
tidy [ui_tests (tests)]: ui subdirectory `tests/ui/loop-match` created
tidy [ui_tests (tests)]: ui subdirectory `tests/ui/offload` created
tidy [ui_tests (tests)]: ui subdirectory `tests/ui/pin` created
tidy [ui_tests (tests)]: ui subdirectory `tests/ui/pin-ergonomics` created
tidy [ui_tests (tests)]: ui subdirectory `tests/ui/reborrow` created
tidy [ui_tests (tests)]: ui subdirectory `tests/ui/rust-2018` created
tidy [ui_tests (tests)]: ui subdirectory `tests/ui/rust-2021` created
tidy [ui_tests (tests)]: ui subdirectory `tests/ui/rust-2024` created
tidy [ui_tests (tests)]: ui subdirectory `tests/ui/sanitize-attr` created
tidy [ui_tests (tests)]: ui subdirectory `tests/ui/scalable-vectors` created
tidy [ui_tests (tests)]: ui subdirectory `tests/ui/sized-hierarchy` created
tidy [ui_tests (tests)]: ui subdirectory `tests/ui/stack-probes` created
tidy [ui_tests (tests)]: ui subdirectory `tests/ui/unstable-feature-bound` created

deleted

tidy [ui_tests (tests)]: ui subdirectory `tests/ui/rust-{2018,2021,2024}` deleted
tidy [ui_tests (tests)]: ui subdirectory `tests/ui/typeof` deleted

thank you for the review:)
@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 2, 2026
@reddevilmidzy
Copy link
Member Author

Ah, I will add a task to check the alignment. @rustbot author

@rustbot

This comment has been minimized.

Comment on lines +1199 to +1204
## `tests/ui/reflection/`

Exercises the `#![feature(type_info)]` feature.

See [Tracking Issue for type_info #146922](https://github.com/rust-lang/rust/issues/146922)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This directory was also added within two weeks.😄

@reddevilmidzy
Copy link
Member Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 18, 2026
@Zalathar
Copy link
Member

Nitpick: Could you please reorder the commits, so that the readme changes come before adding the tidy check?

That way, every individual commit should successfully pass tests, which is a nice property to have.

After that, I think we should be good to go.

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 28, 2026
@rustbot
Copy link
Collaborator

rustbot commented Jan 28, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

Copy link
Member Author

@reddevilmidzy reddevilmidzy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the review! @Zalathar

@rustbot ready

View changes since this review

Comment on lines +1477 to +1480
## `tests/ui/trimmed-paths/`

Tests for the `#[doc(hidden)]` items.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rearranged the commit order and added this section,

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 28, 2026
@Zalathar
Copy link
Member

Thanks for your patience. 🙌

@bors r+

@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 29, 2026

📌 Commit a085410 has been approved by Zalathar

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 29, 2026
Zalathar added a commit to Zalathar/rust that referenced this pull request Jan 29, 2026
…thar

Tidy: detect ui tests subdirectory changes so `tests/ui/README.md` stays in sync

close: rust-lang#150399

There's an issue where `tests/ui/README.md` isn't updated whenever the ui subdirectory changes.
I've added subdirectory change detection to tidy ~~added a new mention to `triage.toml` to notify `tests/ui/README.md` to also be updated~~.

r? @Urgau
rust-bors bot pushed a commit that referenced this pull request Jan 29, 2026
Rollup of 8 pull requests

Successful merges:

 - #150474 (Tidy: detect ui tests subdirectory changes so `tests/ui/README.md` stays in sync)
 - #150572 (Improve move error diagnostic for `AsyncFn` closures)
 - #151596 (Fix -Zmir-enable-passes to detect unregistered enum names in declare_passes macro)
 - #151802 (Make `QueryDispatcher::Qcx` an associated type)
 - #151559 ([rustdoc] Add a marker to tell users that there are hidden (deprecated) items in the search results)
 - #151665 (Fix contrast ratio for `Since` element in rustodoc dark theme)
 - #151798 (Update `askama` to `0.15.3`)
 - #151800 (Subscribe myself to translation diagnostics)
rust-bors bot pushed a commit that referenced this pull request Jan 29, 2026
Rollup of 12 pull requests

Successful merges:

 - #150474 (Tidy: detect ui tests subdirectory changes so `tests/ui/README.md` stays in sync)
 - #150572 (Improve move error diagnostic for `AsyncFn` closures)
 - #151596 (Fix -Zmir-enable-passes to detect unregistered enum names in declare_passes macro)
 - #151802 (Make `QueryDispatcher::Qcx` an associated type)
 - #149110 (Implement `cast_slice` for raw pointer types)
 - #151559 ([rustdoc] Add a marker to tell users that there are hidden (deprecated) items in the search results)
 - #151665 (Fix contrast ratio for `Since` element in rustdoc dark theme)
 - #151785 (Stabilize feature(push_mut))
 - #151798 (Update `askama` to `0.15.3`)
 - #151800 (Subscribe myself to translation diagnostics)
 - #151804 (Document, sort, and tweak spellcheck entries in `typos.toml`)
 - #151805 (Fix grammar in `env::current_exe()#Security`)
@rust-bors rust-bors bot merged commit dd43c88 into rust-lang:main Jan 29, 2026
11 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Jan 29, 2026
rust-timer added a commit that referenced this pull request Jan 29, 2026
Rollup merge of #150474 - reddevilmidzy:tidy-sub-dir, r=Zalathar

Tidy: detect ui tests subdirectory changes so `tests/ui/README.md` stays in sync

close: #150399

There's an issue where `tests/ui/README.md` isn't updated whenever the ui subdirectory changes.
I've added subdirectory change detection to tidy ~~added a new mention to `triage.toml` to notify `tests/ui/README.md` to also be updated~~.

r? @Urgau
@reddevilmidzy reddevilmidzy deleted the tidy-sub-dir branch January 29, 2026 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-tidy Area: The tidy tool S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add comment when new directory is added to tests/ui

4 participants